package com.example.accessingdatamybatisplus.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.accessingdatamybatisplus.Customer;

import java.util.List;

/**
 * @author caiwl
 * @date 2020/12/24 9:34
 */
public interface CustomerMapper extends BaseMapper<Customer> {
    default List<Customer> selectByLastName(String lastName) {
        QueryWrapper<Customer> wrapper = new QueryWrapper<>();
        wrapper.eq("last_name", lastName);
        return selectList(wrapper);
    }
}
